import scrapy

class AuthorSpider(scrapy.Spider):
    name = "author"
    start_urls = ['http://quotes.toscrape.com/']

    def parse(self, response, **kwargs):
        author_links = response.css(".author + a")
        yield from response.follow_all(author_links, self.parse_author)

        next_page = response.css("ul.pager li.next a")
        yield from response.follow_all(next_page,callback=self.parse)

    def parse_author(self,reponse):
        return {
            "name":reponse.css(".author-title::text").get(),
            "bir":reponse.css(".author-born-date::text").get(),
            "location":reponse.css(".author-born-location::text").get(),
        }
